We recently observed that surfactant sodium dodecyl sulfate (SDS)-encased HiPco single-walled carbon nanotubes (SWNTs) respond optically to hydrogen peroxide (H2O2) in the near-infrared region. In this report, we demonstrate that SDS-encased SWNTs immobilized with glucose oxidase (GOx) can be used to optically detect an enzymatic reaction of glucose based on their H2O2 sensitivity as well as pH sensitivity. Only the enzymatic product H2O2 induces the SWNT near-infrared spectral changes in buffer solutions (pH = 6.0), but both H2O2 and gluconic acid products do this in unbuffered solutions. The SWNT optical response to glucose possesses sensitivity and selectivity similar to an electrochemical method using carbon nanotube nanoelectrode arrays. Our results suggest possible carbon nanotube-based optical tools for molecular recognition applications.